graph LR A[File v1] -->|Edited| B[File v2]
Git is a distributed versioning system
Consider a single file. After the first edit, you now have two differents ones.
graph LR A[File v1] -->|Edited| B[File v2]
In Google Docs, you can see the version history (and revert) while in Word you can use track changes to see edits but revisions are more complicated…
What we do not do is keep multiple versions of the file around as complete files. What is done is that the original document and only the changes made to the file—called diffs—are saved.
Add a new figure to the file and now you have three different entities.
graph LR A[File v1] -->|Edited| B[File v2] B -->|New Figure| C[File v3]
Perhaps the figure did not work out, and you decided to replace it with an image.
graph LR A[File v1] -->|Edited| B[File v2] B -->|Figure| C[File v3] B -->|Table| D[File v4]
For each new “revision”, you create a separate instance of the file itself.
Continue editing and making revisions.
graph LR A[File v1] -->|Edited| B[File v2] B -->|Figure| C[File v3] B -->|Table| D[File v4] D -->|Edited| E[File v5]
Eventually, you finish making revisions to the file.
graph LR A[File v1] -->|Edited| B[File v2] B -->|Figure| C[File v3] B -->|Table| D[File v4] D -->|Edited| E[File v5] E -->|Submitted| F[Thesis!]
Git allows you to have access to the entire history of the file and can revert to any of the previous version you want to.
Not all documents are incremental. Submitting for publication requires a different layout, citation format, etc. than for your thesis. Both of these are derived from File v5 as different branches.
graph LR A[File v1] -->|Edited| B[File v2] B -->|Figure| C[File v3] B -->|Table| D[File v4] D -->|Edited| E[File v5] E -->|Submitted| F[Thesis!] E -->|Submitted| G[Publication]
This is a process that can include hundreds of files, data sets, images, shapefiles, etc. It is a Project Based approach.
And the entire project is referred to as a Repository.
A git repository can live in many places.
Having a single remote Repository allows you to keep all the remote repositories in sync.
For all these computers, you need to make sure you are pushing changes to GitHub from your current machine so that when you get to the next computer you can pull down these changes.
With a GitHub repository, several people can contribute to the same project and have access to the same content.
GitHub has a fine granularity of control over who can access content and how much access they can have.
If you are not using a password manager, PLEASE START TODAY.
Settings \(\to\) Developer Settings \(\to\) Personal Access Tokens
Select custom length and allow for enough time to not be a problem. Save long token securely.
From your profile page, select the Repositories menu and follow the instructions.
- Names & Descriptions.
- Private vs Public.
- The README.md file as your ‘front page’.
- The .gitignore file.
- Licenses.
- Websites.
The repository interface allows:
Return to course table of contents.